# -*- conding:UTF-8 -*-

'''
@ Project: P7_5group_lotk
@ File: login_utils.py
@ Author: 罗婷
@ Date：2022/6/9 14:09
# 强制登录
'''
from functools import wraps
from flask import g


def login_qlvi(func):
    @wraps(func)
    def wrap(*args, **kwargs):
        if g.user_id:
            return func(*args, **kwargs)
        else:
            return {'msg': '请先登录'}, 401
    return wrap






